$(document).ready(function(){

	var current,over;
	
	$("#myTable td").mousedown(function(e){
		over = false;
		$(".holder td").html($(this).parent().find(":first-child").html());
		current = this;
		
		$(".rfpNavBody li span").mouseover(function(){
			over = true;
			$(this).css({background:"#000", color: "#FFF"});
		});
		
		$().mouseup(function(){
				$(".holder td").html('');
				$(".holder").hide();
				//alert(over);
				if (over) {
					$(current).parent().fadeOut(1000);
					//alert("fas");
				}
					
		});
		
		$(".rfpNavBody li span").mouseout(function(){
		   $(this).attr("style","");
		   over = false;
		});
	});
	
	$().mousemove(function(e){
		var x = e.pageX;
		var y = e.pageY;
		//check exist
		if ($(".holder td").html() != '')
			$(".holder").css({top: y+5+"px", left: x+5+"px"}).show();

	});
	


});